package com.zhaoxi.project.wms.service.impl;

import java.util.List;

import com.zhaoxi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhaoxi.project.wms.mapper.WmsGoodsStockLogMapper;
import com.zhaoxi.project.wms.domain.WmsGoodsStockLog;

/**
 * 出入库记录Service业务层处理
 *
 * @author zhaoxi
 * @date 2023-08-25
 */
@Service
public class WmsGoodsStockLogServiceImpl {
    @Autowired
    private WmsGoodsStockLogMapper wmsGoodsStockLogMapper;

    /**
     * 查询出入库记录
     *
     * @param id 出入库记录主键
     * @return 出入库记录
     */

    public WmsGoodsStockLog selectWmsGoodsStockLogById(Long id) {
        return wmsGoodsStockLogMapper.selectWmsGoodsStockLogById(id);
    }

    /**
     * 查询出入库记录列表
     *
     * @param wmsGoodsStockLog 出入库记录
     * @return 出入库记录
     */

    public List<WmsGoodsStockLog> selectWmsGoodsStockLogList(WmsGoodsStockLog wmsGoodsStockLog) {
        return wmsGoodsStockLogMapper.selectWmsGoodsStockLogList(wmsGoodsStockLog);
    }

    /**
     * 新增出入库记录
     *
     * @param wmsGoodsStockLog 出入库记录
     * @return 结果
     */

    public int insertWmsGoodsStockLog(WmsGoodsStockLog wmsGoodsStockLog) {
        wmsGoodsStockLog.setCreateTime(DateUtils.getNowDate());
        return wmsGoodsStockLogMapper.insertWmsGoodsStockLog(wmsGoodsStockLog);
    }

}
